package mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import pojo.Book;
import pojo.User;
import pojo.vo.UserVo;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-12-05
 * Time: 14:45
 */
@Mapper
public interface UserMapper {
    User login(@Param("account") String account, @Param("password")String password);

    User getUserByAccount(String account);

    boolean modifyUser(@Param("user") User user);

    User Search(String account);

    boolean register(@Param("account") String account, @Param("password")String password, @Param("nick_name")String nick_name, @Param("category_id")long category_id);

    User getUserByName(String name);

    boolean deleteUser1(String account);

    boolean addUser(@Param("account") String account, @Param("password")String password, @Param("nick_name")String nick_name, @Param("category_id")Long category_id,@Param("already_number")Long already_number);

    boolean updateUser(@Param("newuser") User newuser);

    List<User> listuserByAccount(@Param("account") String account);
    public List<UserVo> listUser();
}
